/*
 * ModelCC, distributed under ModelCC Shared Software License, www.modelcc.org
 */

package test.modelcc.language.imperative.model.statement;

import org.modelcc.Prefix;

import test.modelcc.language.imperative.model.Expression;
import test.modelcc.language.imperative.model.Statement;

@Prefix("while")
public class RepetitiveStatement extends Statement 
{
	private Expression condition;
	
	private Statement statement;
	
	// Execution
	
    public double run ()
    {
    	while (condition.eval()!=0)
    		statement.run();

    	return 0;
    }
}
